import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import './assets/css/global.css'
// 导入iconfront
import './assets/font/iconfont.css'
// 导入axios
import axios from 'axios'
// 导入moment
import moment from 'moment'
// import echarts from 'echarts';//引入echarts
// Vue.prototype.$echarts = echarts //引入组件
//挂载moment
Vue.prototype.$moment = moment
//挂载axios
Vue.prototype.$http = axios
//设置访问根路径
axios.defaults.baseURL="http://localhost:9000"

Vue.config.productionTip = false

//全局时间过滤器
Vue.filter('dateYMDHMSFormat',function(dateStr,pattern='YYYY-MM-DD HH:mm:ss'){
    if(dateStr === null){
        return "-";
    }
    return moment(dateStr).format(pattern);
})

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
